package nc.impl.acm.acc.interestcal;

import java.util.ArrayList;
import java.util.HashMap;

import javax.naming.NamingException;

import nc.bs.acm.acc.interestcal.InterestcalDMO;
import nc.bs.logging.Logger;
import nc.itf.acm.acc.interestcal.IInterestcal;
import nc.vo.acm.acc.interestcal.InterestcalBVO;
import nc.vo.acm.acc.interestcal.MakewayVO;
import nc.vo.pub.BusinessException;
import nc.vo.pub.lang.UFDate;
import nc.vo.pub.lang.UFDouble;

public class InterestcalImpl implements IInterestcal {

	public InterestcalImpl() {
		super();
	}

	public ArrayList<InterestcalBVO> queryInterestcalBVOsByDate(String[] pk_manaccounts, UFDate curDate, String pk_corp) throws BusinessException {
		try {
			return new InterestcalDMO().queryInterestcalBVOsByDate(pk_manaccounts, curDate, pk_corp);
		} catch (NamingException e) {
			Logger.error(e.getMessage());
			return null;
		}
	}

	public UFDouble interestcalByDate(UFDate curDate, String pk_manaccount) throws BusinessException {
		try {
			return new InterestcalDMO().interestcalByDate(curDate, pk_manaccount);
		} catch (NamingException e) {
			Logger.error(e.getMessage());
			return null;
		}
	}

	public HashMap<String, UFDouble> interestcalByDate(UFDate curDate, String[] pk_manaccounts) throws BusinessException {
		try {
			return new InterestcalDMO().interestcalByDate(curDate, pk_manaccounts);
		} catch (NamingException e) {
			Logger.error(e.getMessage());
			return null;
		}
	}

	public ArrayList<InterestcalBVO> interestcalByDate(UFDate curDate, ArrayList<InterestcalBVO> interestcalVOs) throws BusinessException {
		try {
			return new InterestcalDMO().interestcalByDate(curDate, interestcalVOs);
		} catch (NamingException e) {
			Logger.error(e.getMessage());
			return null;
		}
	}

	public MakewayVO insertMakewayVO(MakewayVO makewayVo) throws BusinessException {

		try {
			return new InterestcalDMO().insertMakewayVO(makewayVo);
		} catch (NamingException e) {
			Logger.error(e.getMessage());
			return null;
		}
	}

	public MakewayVO queryMakewayVO(String pk_corp) throws BusinessException {
		try {
			return new InterestcalDMO().queryMakewayVO(pk_corp);
		} catch (NamingException e) {
			Logger.error(e.getMessage());
			return null;
		}
	}

	public MakewayVO updateMakewayVO(MakewayVO makewayVo) throws BusinessException {
		try {
			return new InterestcalDMO().updateMakewayVO(makewayVo);
		} catch (NamingException e) {
			Logger.error(e.getMessage());
			return null;
		}
	}

	public ArrayList<InterestcalBVO> queryInterestcalBVOs(String[] pk_products, String pk_corp, String[] pk_manaccounts) throws BusinessException {
		try {
			return new InterestcalDMO().queryInterestcalBVOs(pk_products, pk_corp, pk_manaccounts);
		} catch (NamingException e) {
			Logger.error(e.getMessage());
			return null;
		}
	}

	public void readNoCheckPassData(String pk_corp) throws BusinessException {
		try {
			new InterestcalDMO().readNoCheckPassData(pk_corp);
		} catch (NamingException e) {
			Logger.error(e.getMessage());
		}
	}

	public InterestcalBVO[] filterInterestcalBVO(InterestcalBVO[] bodyVos, UFDate curDate) throws BusinessException {
		try {
			return new InterestcalDMO().filterInterestcalBVO(bodyVos, curDate);
		} catch (NamingException e) {
			Logger.error(e.getMessage());
			return null;
		}
	}

}
